package com.itcast.common.enums;

import java.io.Serializable;

/**
 * 响应状态枚举
 *
 * @author zheng.zhang
 */

public enum ResponseEnum implements Serializable {
    /**
     * 请求成功
     */
    REQUEST_SUCCESS(200, "请求成功"),
    /**
     * 请求失败
     */
    SERVER_ERROR(500, "服务器内部错误");

    /**
     * 响应码
     */
    private Integer code;

    /**
     * 响应信息
     */
    private String msg;

    ResponseEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
